<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>">
		<meta http-equiv="Content-Type" content="text/html; charset=x-gbk">
		<title><s:property value="#request.topic.ttopic" /> by <s:property
				value="#request.topicUser.uname" /> - 10ACCP2班级论坛 - Powered by
			19#417</title>
		<link rel="stylesheet" type="text/css" href="css/style_1_common.css">
		<link rel="stylesheet" type="text/css"
			href="css/style_1_forum_viewthread.css">
		<link rel="stylesheet" id="css_extstyle" type="text/css"
			href="css/style.css">
		<script src="js/common.js" type="text/javascript">
</script>
		<script src="js/forum.js" type="text/javascript">
</script>
		<script type="text/javascript" src="ckeditor/ckeditor.js">
</script>
		<script type="text/javascript">
function setHomePages() {
	document.documentElement.style.behavior = "url(#default#homepage)";
	document.documentElement.setHomePage('http://localhost:8080/Accp_BBS');

}
function addCookie() {
	if (document.all) {
		window.external.addFavorite('http://localhost:8080/Accp_BBS',
				'10ACCP2班级论坛');
	} else if (window.sidebar) {
		window.sidebar.addPanel('10ACCP2班级论坛',
				'http://localhost:8080/Accp_BBS', '');
	}
}
</script>
	</head>

	<body id="nv_forum" class="pg_viewthread"
		onkeydown="if(event.keyCode==27) return false;">
		<div id="append_parent"></div>
		<div id="ajaxwaitid"></div>
		<div id="toptb" class="cl">
			<div class="wp">
				<div class="z">
					<a href="javascript:setHomePages()">设为首页</a><a
						href="javascript:addCookie()">收藏本站</a>
					<script type="text/javascript">
var _speedMark = new Date();</script>
				</div>
			</div>
		</div>
		<div id="hd">
			<div class="wp">
				<div class="hdc cl">
					<h2>
						<a href="index" title="10ACCP2论坛"><img src="images/ACCP2.png"
								alt="10ACCP2论坛" border="0">
						</a>
					</h2>
					<%@ include file="user.jsp"%>
				</div>
				<div id="nv">
					<ul>
						<li class="a" id="mn_forum">
							<a href="index" hidefocus="true" title="BBS">论坛<span>BBS</span>
							</a>
						</li>
						<li id="mn_N12a7">
							<a href="index" hidefocus="true" title="Ranklist">班级<span>Class</span>
							</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<script src="js/forum_viewthread.js" type="text/javascript">
</script>
		<div id="wp" class="wp">
			<!--[diy=diynavtop]-->
			<div id="diynavtop" class="area"></div>
			<!--[/diy]-->
			<div id="pt" class="bm cl">
				<div class="z">
					<a href="#" class="nvhm" title="首页">10ACCP2论坛</a>
					<em>&#8250;</em>
					<a href="index">10ACCP2论坛>></a>
					<em>&#8250;</em>
					<a href="topic-List">〓<s:property
							value="#session.section.sname" />频道〓>></a><em>&#8250;</em>
					<a href="topic-List">帖子分享>></a>
					<a href="topic?tid=<s:property value="#request.topic.tid" />"><s:property
							value="#request.topic.ttopic" /> </a>
				</div>
			</div>
			<div class="wp">
				<!--[diy=diy1]-->
				<div id="diy1" class="area"></div>
				<!--[/diy]-->
			</div>
			<div id="ct" class="wp cl">
				<div id="pgt" class="pgs mbm cl ">
					<div class="pgt">
						<div class="pg">
							<s:iterator value="pageInfo.pageNumbers" var="num" status="nums">
								<s:if test="pageInfo.pageIndex == #num">
									<strong><s:property value="#num" /> </strong>
								</s:if>
								<s:else>
									<a
										href="topic?tid=<s:property value="tid"/>&pageInfo.pageIndex=<s:property value="#num" />"><s:property
											value="#num" /> </a>
								</s:else>
							</s:iterator>
							<s:if test="pageInfo.totalPage == 1 "></s:if>
							<s:elseif test="pageInfo.pageIndex == pageInfo.totalPage"></s:elseif>
							<s:else>
								<a
									href="topic?tid=<s:property value="tid" />&pageInfo.pageIndex=<s:property value="pageInfo.nextPage"/>"
									class="nxt">下一页</a>
							</s:else>
						</div>
					</div>
					<span class="y pgb" id="visitedforums"><a
						href="topic-List?sid=<s:property value="#request.topic.tsid" />">返回列表</a>
					</span>
					<a id="newspecial"
						href="newTopic.jsp?sid=<s:property value="#request.topic.tsid"/>"
						title="发新帖"><img src="images/pn_post.png" alt="发新帖"> </a>
				</div>
				<div id="postlist" class="pl bm">
					<table cellpadding="0" cellspacing="0">
						<tbody>
							<tr>
								<td class="pls ptm pbm">
									<div class="hm">
										<span class="xg1">查看:</span>
										<span class="xi1"><s:property
												value="#request.topic.tclickCount" /> </span><span class="pipe">|</span><span
											class="xg1">回复:</span>
										<span class="xi1"><s:property
												value="#request.topic.treplyCount" /> </span>
									</div>
								</td>
								<td class="plc ptm pbn">
									<h1 class="ts">
										<a href="#" id="thread_subject"><s:property
												value="#request.topic.ttopic" /> </a>
										<span class="xw0 xs1 xg1"></span>
									</h1>
								</td>
							</tr>
						</tbody>
					</table>
					<table class="ad" cellpadding="0" cellspacing="0">
						<tbody>
							<tr>
								<td class="pls"></td>
								<td class="plc"></td>
							</tr>
						</tbody>
					</table>
					<s:if test="pageInfo.pageIndex == 1">
						<div id="topic">
							<table cellpadding="0" cellspacing="0">
								<tbody>
									<tr>
										<td class="pls" rowspan="2">
											<div class="pi">
												<div class="authi">
													<a href="#" target="_blank" class="xw1"><s:property
															value="#request.topicUser.uname" /> </a>
												</div>
											</div>
											<div class="p_pop blk bui"
												id="<s:property value="#request.topicUser.uid"/>1"
												style="display: none; margin-top: -11px;">
												<div class="m z">
													<div id="<s:property value="#request.topicUser.uid"/>1_ma"></div>
												</div>
												<div class="i y">
													<div>
														<strong><a href="#" target="_blank" class="xi2"><s:property
																	value="#request.topicUser.uname" /> </a> </strong>
														<s:if test="#request.topicUser.ustate == 1">
															<em>当前在线</em>
														</s:if>
														<s:else>
															<em>当前离线</em>
														</s:else>
													</div>
													<dl class="cl">
														<dt>
															UID
														</dt>
														<dd>
															<s:property value="#request.topicUser.uid" />
														</dd>
														<dt>
															积分
														</dt>
														<dd>
															<s:property value="#request.topicUser.upoint" />
														</dd>
														<dt>
															生日
														</dt>
														<dd>
															<s:property value="#request.topicUser.ubirthday" />
														</dd>
														<dt>
															性别
														</dt>
														<dd>
															<s:if test="#request.topicUser.usex == 1">男</s:if>
															<s:else>女</s:else>
														</dd>
														<dt>
															注册时间
														</dt>
														<dd>
															<s:property value="#request.topicUser.uregDate" />
														</dd>
													</dl>
													<div class="imicn">
														邮箱：&nbsp;&nbsp;&nbsp;&nbsp;
														<s:property value="#request.topicUser.uemail" />
													</div>
													<div class="imicn">
														<a href="#" target="_blank" title="查看详细资料"><img
																src="images/userinfo.gif" alt="查看详细资料"> </a>
													</div>
													<div id="avatarfeed">
														<span id="threadsortswait"></span>
													</div>
												</div>
											</div>
											<div>
												<div class="avatar"
													onmouseover="showauthor(this, '<s:property value="#request.topicUser.uid"/>1')">
													<a href="#" target="_blank"><img
															src="<s:property value="#request.topicUser.uimgUrl"/>">
													</a>
												</div>
												<p>
												</p>
											</div>
											<p id="g_<s:property value="#request.topicUser.uid"/>1"
												onmouseover="showMenu({'ctrlid':this.id, 'pos':'12!'});">
												<s:if test="#request.topicUser.uclass > 9">
													<img src="images/star_level3.gif" alt="Rank: 6">
												</s:if>
												<s:elseif test="#request.topicUser.uclass > 6">
													<img src="images/star_level2.gif" alt="Rank: 6">
												</s:elseif>
												<s:else>
													<img src="images/star_level1.gif" alt="Rank: 6">
												</s:else>
											</p>
											<div
												id="g_<s:property value="#request.topicUser.uid"/>1_menu"
												class="tip tip_4" style="display: none;">
												<div class="tip_horn"></div>
												<div class="tip_c">
													积分：&nbsp;&nbsp;
													<s:property value="#request.topicUser.upoint" />
													&nbsp;&nbsp;&nbsp;&nbsp;等级：&nbsp;&nbsp;
													<s:property value="#request.topicUser.uclass" />
												</div>
											</div>
											<dl class="pil cl">
												<dt>
													UID
												</dt>
												<dd>
													<s:property value="#request.topicUser.uid" />
												</dd>
												<dt>
													积分
												</dt>
												<dd>
													<s:property value="#request.topicUser.upoint" />
												</dd>
												<dt>
													生日
												</dt>
												<dd>
													<s:property value="#request.topicUser.ubirthday" />
												</dd>
											</dl>
										</td>
										<td class="plc">
											<div class="pi">
												<strong><a><em>1</em>楼</a> </strong>
												<div class="pti">
													<div class="pdbt">
													</div>
													<div class="authi">
														<img class="authicn vm" id="authicon9743744"
															src="images/online_member.gif">
														<em id="authorposton9743744">发表于 <s:property
																value="#request.topic.ttime" /> </em>
													</div>
												</div>
											</div>
											<div class="pct">
												<div class="a_pt">
												</div>
												<style type="text/css">
.pcb {
	margin-right: 0
}
</style>
												<div class="pcb">
													<div class="t_fsz">
														<table cellpadding="0" cellspacing="0">
															<tbody>
																<tr>
																	<td class="t_f" id="postmessage_9743744">
																		<div>
																			<s:property value="#request.topic.tcontents"
																				escape="false" />
																		</div>
																	</td>
																</tr>
															</tbody>
														</table>
													</div>
													<div id="comment_9743744" class="cm">
													</div>
												</div>
											</div>
										</td>
									</tr>
									<tr>
										<td class="plc plm">
											<div class="sign"
												style="max-height: 300px; maxHeightIE: 300px;">
												<s:property value="#request.topicUser.ustatement" />
											</div>
										</td>
									</tr>
									<tr>
										<td class="pls"></td>
										<td class="plc">
											<div class="po">
												<div class="pob cl">
													<em> <input id="UserSinaId9743744" value="0"
															type="hidden"> </em>
													<p>
														&nbsp;
													</p>
												</div>
											</div>
										</td>
									</tr>
									<tr class="ad">
										<td class="pls"></td>
										<td class="plc"></td>
									</tr>
								</tbody>
							</table>
						</div>
					</s:if>
					<s:iterator value="#request.replys" var="r" status="replys">
						<s:iterator value="#request.replyUsers" var="u" status="users">
							<s:if test="#r.user.uid == #u.uid">
								<s:set value="#u" var="replyUser"></s:set>
							</s:if>
						</s:iterator>
						<div id="reply">
							<table cellpadding="0" cellspacing="0">
								<tbody>
									<tr>
										<td class="pls" rowspan="2">
											<div class="pi">
												<div class="authi">
													<a href="#" target="_blank" class="xw1"><s:property
															value="#replyUser.uname" /> </a>
												</div>
											</div>
											<div class="p_pop blk bui"
												id="<s:property value="#replyUser.uid"/><s:property value="#replys.count+(pageInfo.pageSize*(pageInfo.pageIndex-1))+1" />"
												style="display: none; margin-top: -11px;">
												<div class="m z">
													<div
														id="<s:property value="#replyUser.uid"/><s:property value="#replys.count+(pageInfo.pageSize*(pageInfo.pageIndex-1))+1" />_ma"></div>
												</div>
												<div class="i y">
													<div>
														<strong><a href="#" target="_blank" class="xi2"><s:property
																	value="#replyUser.uname" /> </a> </strong>
														<s:if test="#replyUser.ustate == 1">
															<em>当前在线</em>
														</s:if>
														<s:else>
															<em>当前离线</em>
														</s:else>
													</div>
													<dl class="cl">
														<dt>
															UID
														</dt>
														<dd>
															<s:property value="#replyUser.uid" />
														</dd>
														<dt>
															积分
														</dt>
														<dd>
															<s:property value="#replyUser.upoint" />
														</dd>
														<dt>
															生日
														</dt>
														<dd>
															<s:property value="#replyUser.ubirthday" />
														</dd>
														<dt>
															性别
														</dt>
														<dd>
															<s:if test="#replyUser.usex == 1">男</s:if>
															<s:else>女</s:else>
														</dd>
														<dt>
															注册时间
														</dt>
														<dd>
															<s:property value="#replyUser.uregDate" />
														</dd>
													</dl>
													<div class="imicn">
														邮箱：&nbsp;&nbsp;&nbsp;&nbsp;
														<s:property value="#replyUser.uemail" />
													</div>
													<div class="imicn">
														<a href="#" target="_blank" title="查看详细资料"><img
																src="images/userinfo.gif" alt="查看详细资料"> </a>
													</div>
													<div id="avatarfeed">
														<span id="threadsortswait"></span>
													</div>
												</div>
											</div>
											<div>
												<div class="avatar"
													onmouseover="showauthor(this, '<s:property value="#replyUser.uid"/><s:property value="#replys.count+(pageInfo.pageSize*(pageInfo.pageIndex-1))+1" />')">
													<a href="#" target="_blank"><img
															src="<s:property value="#replyUser.uimgUrl"/>"> </a>
												</div>
												<p>
												</p>
											</div>
											<p
												id="g_<s:property value="#replyUser.uid"/><s:property value="#replys.count+(pageInfo.pageSize*(pageInfo.pageIndex-1))+1" />"
												onmouseover="showMenu({'ctrlid':this.id, 'pos':'12!'});">
												<s:if test="#replyUser.uclass > 9">
													<img src="images/star_level3.gif" alt="Rank: 6">
												</s:if>
												<s:elseif test="#replyUser.uclass > 6">
													<img src="images/star_level2.gif" alt="Rank: 6">
												</s:elseif>
												<s:else>
													<img src="images/star_level1.gif" alt="Rank: 6">
												</s:else>

											</p>

											<div
												id="g_<s:property value="#replyUser.uid"/><s:property value="#replys.count+(pageInfo.pageSize*(pageInfo.pageIndex-1))+1" />_menu"
												class="tip tip_4" style="display: none;">
												<div class="tip_horn"></div>
												<div class="tip_c">
													积分：&nbsp;&nbsp;
													<s:property value="#replyUser.upoint" />
													&nbsp;&nbsp;&nbsp;&nbsp;等级：&nbsp;&nbsp;
													<s:property value="#replyUser.uclass" />
												</div>
											</div>
											<dl class="pil cl">
												<dt>
													UID
												</dt>
												<dd>
													<s:property value="#replyUser.uid" />
												</dd>
												<dt>
													积分
												</dt>
												<dd>
													<s:property value="#replyUser.upoint" />
												</dd>
												<dt>
													生日
												</dt>
												<dd>
													<s:property value="#replyUser.ubirthday" />
												</dd>
											</dl>
										</td>
										<td class="plc">
											<div class="pi">
												<strong><a><em><s:property
																value="#replys.count+(pageInfo.pageSize*(pageInfo.pageIndex-1))+1" />
													</em>楼</a> </strong>
												<div class="pti">
													<div class="pdbt">
													</div>
													<div class="authi">
														<img class="authicn vm" id="authicon9744796"
															src="images/online_member.gif">
														<em id="authorposton9744796">发表于<s:property
																value="#r.rtime" /> </em>
													</div>
												</div>
											</div>
											<div class="pct">
												<div class="pcb">
													<div class="t_fsz">
														<table cellpadding="0" cellspacing="0">
															<tbody>
																<tr>
																	<td class="t_f" id="postmessage_9744796">
																		<s:property value="#r.rcontents" escape="false" />
																	</td>
																</tr>
															</tbody>
														</table>
													</div>
													<div id="comment_9744796" class="cm">
													</div>
													<div id="post_rate_div_9744796"></div>
												</div>
											</div>
										</td>
									</tr>
									<tr>
										<td class="plc plm">
											<div class="sign"
												style="max-height: 300px; maxHeightIE: 300px;">
												<s:property value="#replyUser.ustatement" />
											</div>
										</td>
									</tr>
									<tr>
										<td class="pls"></td>
										<td class="plc">
											<div class="po">
												<div class="pob cl">
													<em> <input id="UserSinaId9744796" value="0"
															type="hidden"> </em>
													<p>
														&nbsp;
													</p>
												</div>
											</div>
										</td>
									</tr>
									<tr class="ad">
										<td class="pls"></td>
										<td class="plc"></td>
									</tr>
								</tbody>
							</table>
						</div>
					</s:iterator>

					<div id="postlistreply" class="pl">
						<div id="post_new" class="viewthread_table" style="display: none"></div>
					</div>
				</div>
				<form method="post" autocomplete="off" name="modactions"
					id="modactions">
					<input name="formhash" value="c3463f0b" type="hidden">
					<input name="optgroup" type="hidden">
					<input name="operation" type="hidden">
					<input name="listextra" value="page%3D2" type="hidden">
					<input name="page" value="1" type="hidden">
				</form>
				<div class="pgs mtm mbm cl">
					<div class="pg">
						<s:iterator value="pageInfo.pageNumbers" var="num" status="nums">
							<s:if test="pageInfo.pageIndex == #num">
								<strong><s:property value="#num" /> </strong>
							</s:if>
							<s:else>
								<a
									href="topic?tid=<s:property value="tid"/>&pageInfo.pageIndex=<s:property value="#num" />"><s:property
										value="#num" /> </a>
							</s:else>
						</s:iterator>
						<s:if test="pageInfo.totalPage == 1 "></s:if>
						<s:elseif test="pageInfo.pageIndex == pageInfo.totalPage"></s:elseif>
						<s:else>
							<a
								href="topic?tid=<s:property value="tid" />&pageInfo.pageIndex=<s:property value="pageInfo.nextPage"/>"
								class="nxt">下一页</a>
						</s:else>
					</div>
					<span class="pgb y" id="visitedforumstmp"><a
						href="topic-List?sid=<s:property value="#request.topic.tsid" />">返回列表</a>
					</span>
					<a id="newspecialtmp"
						href="newTopic.jsp?sid=<s:property value="#request.topic.tsid"/>"
						title="发新帖"><img src="images/pn_post.png" alt="发新帖"> </a>
				</div>
				<!--[diy=diyfastposttop]-->
				<div id="diyfastposttop" class="area"></div>
				<!--[/diy]-->

				<s:if test="#session.user != null">
					<div id="f_pst" class="pl bm bmw">
						<form method="post" autocomplete="off" id="fastpostform"
							action="replyAdd" onSubmit="return fastpostvalidate(this)">
							<table cellspacing="0" cellpadding="0">
								<tr>
									<td class="pls">
										<div class="avatar">
											<img src="<s:property value="#session.user.uimgUrl" />"
												width="120px" height="120px" />
										</div>
									</td>
									<td class="plc">
										<span id="fastpostreturn"></span>
										<div class="cl">
											<div id="fastsmiliesdiv" class="y">
												<div id="fastsmiliesdiv_data">
													<div id="fastsmilies"></div>
												</div>
											</div>
											<div class="hasfsl" id="fastposteditor">
												<div class="tedt mtn" style="width: 700px;">
													<div class="bar">
														<span class="y"></span>
														<div class="fpd">
															&nbsp;&nbsp;&nbsp;&nbsp;发表回复：
														</div>
													</div>
													<div class="area">
														<textarea rows="6" cols="80" name="reply.rcontents"
															id="fastpostmessage" tabindex="4" class="pt"></textarea>
														<script type="text/javascript">
CKEDITOR.replace('fastpostmessage', addUploadButton(this));

function addUploadButton(editor) {

	CKEDITOR.on('dialogDefinition', function(ev) {

		var dialogName = ev.data.name;

		var dialogDefinition = ev.data.definition;

		if (dialogName == 'image') {

			var infoTab = dialogDefinition.getContents('info');

			infoTab.add( {

				type : 'button',

				id : 'upload_image',

				align : 'center',

				label : '上传',

				onClick : function(evt) {

					var thisDialog = this.getDialog();

					var txtUrlObj = thisDialog.getContentElement('info',
							'txtUrl');

					var txtUrlId = txtUrlObj.getInputElement().$.id;

					addUploadImage(txtUrlId);

				}

			}, 'browse'); //place front of the browser button

		}

	});

}

function addUploadImage(theURLElementId) {

	var uploadUrl = "uploadImg.jsp"; //这是我自己的处理文件/图片上传的页面URL

	var imgUrl = window.showModalDialog(uploadUrl);

	//在upload结束后通过js代码window.returnValue=...可以将图片url返回给imgUrl变量。

	//更多window.showModalDialog的使用方法参考 

	var urlObj = document.getElementById(theURLElementId);

	urlObj.value = imgUrl;

	urlObj.fireEvent("onchange"); //触发url文本框的onchange事件，以便预览图片

}
</script>
													</div>
												</div>
											</div>
										</div>
										<div class="upfl hasfsl">

											<div id="attachlist"></div>
										</div>
										<p class="ptm pnpost">
											<button type="submit" name="replysubmit" id="fastpostsubmit"
												class="pn pnc vm" value="replysubmit" tabindex="5">
												<strong>发表回复</strong>
											</button>
										</p>
									</td>
								</tr>
							</table>
						</form>
					</div>
				</s:if>


				<!--[diy=diyfastposttop]-->
				<div id="diyfastposttop" class="area"></div>
				<!--[/diy]-->
			</div>
			<div class="wp mtn">
				<!--[diy=diy3]-->
				<div id="diy3" class="area"></div>
				<!--[/diy]-->
			</div>
		</div>
		<div id="ft" class="wp cl">
			<div id="flk" class="y">
				<p>
					<strong><a href="#" target="_blank">10ACCP2论坛</a> </strong>
					&nbsp;&nbsp;
					<span id="tcss"></span>
				</p>
				<p class="xs0">
					19#417 &nbsp;&nbsp;版权所有 &nbsp;&nbsp;
					<span id="tcss"></span>
					</span>
				</p>
			</div>
			<div id="frt">
				<p>
					Powered by
					<strong><a href="#" target="_blank">19#417</a> </strong>
				</p>
				<p class="xs0">
					&#169; 2011-2012
					<a href="#" target="_blank">10ACCP2</a>
				</p>
			</div>
		</div>
		<div style="position: absolute; display: none; z-index: 9999;"
			id="livemargins_control">
			<img src="images/monitor-background-horizontal.png"
				style="position: absolute; left: -77px; top: -5px;" height="5"
				width="77">
			<img src="images/monitor-background-vertical.png"
				style="position: absolute; left: 0pt; top: -5px;">
			<img id="monitor-play-button" src="images/monitor-play-button.png"
				onmouseover="this.style.opacity=1"
				onmouseout="this.style.opacity=0.5"
				style="position: absolute; left: 1px; top: 0pt; opacity: 0.5; cursor: pointer;">
		</div>
	</body>
</html>